﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Collections;
using PTTK19.DB;

namespace PTTK19.BUS
{
    public class BUS_SanPham
    {
        private int _MaSP;

        public int MaSP
        {
            get { return _MaSP; }
            set { _MaSP = value; }
        }
        private string _TenSP;

        public string TenSP
        {
            get { return _TenSP; }
            set { _TenSP = value; }
        }
        private string _DonVT;

        public string DonVT
        {
            get { return _DonVT; }
            set { _DonVT = value; }
        }
        private int _MaNguyenLieu;

        public int MaNguyenLieu
        {
            get { return _MaNguyenLieu; }
            set { _MaNguyenLieu = value; }
        }

        private string _TenLoaiSP;

        public string TenLoaiSP
        {
            get { return _TenLoaiSP; }
            set { _TenLoaiSP = value; }
        }

        private int _MaLoaiSP;

        public int MaLoaiSP
        {
            get { return _MaLoaiSP; }
            set { _MaLoaiSP = value; }
        }
        private int _MaNL;

        public int MaNL
        {
            get { return _MaNL; }
            set { _MaNL = value; }
        }
        private int _TinhTrang;

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }
        public static DataTable LayDanhSachSP()
        {
            return DB_SanPham.LayDanhSachSP();
        }
        public static DataTable LayThongTinChiTietSanPham()
        {
            return DB_SanPham.LayThongTinChiTietSanPham();
        }
        public static DataTable LayMaLoaiSanPham()
        {
            return DB_SanPham.LayMaLoaiSanPham();
        }
        public static int ThemSanPham(BUS_SanPham sanpham)
        {
            return DB_SanPham.ThemSanPham(sanpham);
        }
        public static int XoaSanPham(int Masp)
        {
            return DB_SanPham.XoaSanPham(Masp);
        }
        public static int CapNhatSanPham(BUS_SanPham sanpham)
        {
            return DB_SanPham.CapNhatSanPham(sanpham);
        }
        ////////
        //Xu ly loai san pham
        public static DataTable LayDanhSachLoaiSP()
        {
            return DB_SanPham.LayDanhSachLoaiSP();
        }
        public static int ThemLoaiSanPham(BUS_SanPham sanpham)
        {
            return DB_SanPham.ThemLoaiSanPham(sanpham);
        }
        public static int XoaLoaiSanPham(int MaLoaisp)
        {
            return DB_SanPham.XoaLoaiSanPham(MaLoaisp);
        }
        public static int CapNhatLoaiSanPham(BUS_SanPham sanpham)
        {
            return DB_SanPham.CapNhatLoaiSanPham(sanpham);
        }
    }
}
